drop database cdcacheinnodbohnekeys;
create database cdcacheinnodbohnekeys;
use cdcacheinnodbohnekeys;

/*=============================================================================*/
/*Datenbank fr die Engine InnoDb ohne Primrschlssel und ohne Fremndschlssel*/
/*=============================================================================*/

/*==============================================================*/
/* Table: artists                                               */
/*==============================================================*/
create table artists
(
   artistId             int not null,
   name                 varchar(255) not null
)
ENGINE=InnoDB;

/*==============================================================*/
/* Table: cds                                                   */
/*==============================================================*/
create table cds
(
   cddbId               bigint not null,
   artistId             int not null,
   title                varchar(255) not null,
   version              int not null,
   numTracks            int not null,
   extd                 text,
   disclen              int not null,
   year                 char(4),
   genreId              int not null
) 
ENGINE=InnoDB;

/*==============================================================*/
/* Table: genres                                                */
/*==============================================================*/
create table genres
(
   genreId              int not null,
   genre                varchar(255)
)
ENGINE=InnoDB;

/*==============================================================*/
/* Table: tracks                                                */
/*==============================================================*/
create table tracks
(
   cddbId               bigint not null,
   trackNo              int not null,
   offset               int not null,
   title                varchar(255) not null,
   artistId             int,
   extt                 text
) 
ENGINE=InnoDB;
  
